package com.live.shop.model;

import org.json.JSONObject;

import java.io.Serializable;

public class KeywordRecordModel  implements Serializable {
    int id;
    int keywordId;//关键词ID
    String answerTxt;//回答文本
    int answerType;//合成方式 0.暂无 1.录音 2.AI合成 3.本地音频
    int answerState;//合成状态 0.暂无 1.已录音 2.已合成 3.已选择
    String answerAudio;//回答音频
    int useNum;//使用次数
    String createTime;
    int deleteStatus;//删除状态 1新增 2编辑 3删除

    public KeywordRecordModel(){

    }
    public KeywordRecordModel(String answerTxt, int answerType, int answerState, String answerAudio,int deleteStatus) {
        this.answerTxt = answerTxt;
        this.answerType = answerType;
        this.answerState = answerState;
        this.answerAudio = answerAudio;
        this.deleteStatus = deleteStatus;
    }

    public JSONObject model2Json(KeywordRecordModel model){
        JSONObject json = new JSONObject();
        try {
            json.put("id",model.getId());
            json.put("keywordId",model.getKeywordId());
            json.put("answerTxt",model.getAnswerTxt());
            json.put("answerType",model.getAnswerType());
            json.put("answerState",model.getAnswerState());
            json.put("answerAudio",model.getAnswerAudio());
            json.put("useNum",model.getUseNum());
            json.put("createTime",model.getCreateTime());
        }catch (Exception e){
            e.printStackTrace();
        }
        return json;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getKeywordId() {
        return keywordId;
    }

    public void setKeywordId(int keywordId) {
        this.keywordId = keywordId;
    }

    public String getAnswerTxt() {
        return answerTxt;
    }

    public void setAnswerTxt(String answerTxt) {
        this.answerTxt = answerTxt;
    }

    public int getAnswerType() {
        return answerType;
    }

    public void setAnswerType(int answerType) {
        this.answerType = answerType;
    }

    public int getAnswerState() {
        return answerState;
    }

    public void setAnswerState(int answerState) {
        this.answerState = answerState;
    }

    public String getAnswerAudio() {
        return answerAudio;
    }

    public void setAnswerAudio(String answerAudio) {
        this.answerAudio = answerAudio;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getUseNum() {
        return useNum;
    }

    public void setUseNum(int useNum) {
        this.useNum = useNum;
    }

    public int getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(int deleteStatus) {
        this.deleteStatus = deleteStatus;
    }
}
